import { Input } from 'antd';
import { memo, useMemo, useState } from 'react'
const ComponentInput = memo(
    function({ notifyFatherChange }:any) {
        const [inputValue, setInputValue] = useState("");
        const handerChange = useMemo(() => (e:any) =>{
            setInputValue(e.target.value)
        notifyFatherChange && notifyFatherChange(e.target.value)
        }, [notifyFatherChange]);
        return <Input placeholder="Basic usage" value={inputValue} onChange={ handerChange }/>
    }
)
export default ComponentInput